//
//  nameView.m
//  SoundPill
//
//  Created by 宋旭东®Des on 15/2/2.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "nameView.h"
#import "FXBlurView.h"
@implementation nameView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createViews];
    }
    return self;
}

- (void)createViews
{
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    [self addSubview:_imageView];
//    iOS8 模糊
//    UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
//    UIVisualEffectView *visual = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//    visual.frame = _imageView.bounds;
//    [_imageView addSubview:visual];
    
    FXBlurView *blurView = [[FXBlurView alloc] initWithFrame:_imageView.bounds];
    [blurView setDynamic:YES];
    blurView.blurRadius = 50;
    blurView.tintColor = [UIColor clearColor];
    [_imageView addSubview:blurView];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
